package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.leftmenu.user;

import br.edu.ufcg.lsd.wbis.ui.client.beans.UserInfo;
import br.edu.ufcg.lsd.wbis.ui.client.ui.management.InfoManager;

import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.menu.BaseItem;
import com.gwtext.client.widgets.menu.event.BaseItemListenerAdapter;

/**
 * @author Renato Miceli
 */
public class SearchUsersItemListener extends BaseItemListenerAdapter {

	private final TabPanel centerPanel;
	
	private final InfoManager<UserInfo> infoManager;

	public SearchUsersItemListener(TabPanel centerPanel, InfoManager<UserInfo> infoManager) {
		this.centerPanel = centerPanel;
		this.infoManager = infoManager;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void onClick(BaseItem item, EventObject e) {
		new SearchWindow(infoManager, centerPanel);
	}

}
